

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.Scanner;

//client class
public class Client{
	
	String hostName;
	int port;
	String fileName;
	private Host host;
	
	Client(String hostName, int port, String fileName){
		this.hostName = hostName;
		this.port = port;
		this.fileName = fileName;
	}
	
	public File read(){
		this.host = new Host(hostName,port);
		File file = host.getFile(fileName);
		return file;
	}
	
	public static void main(String args[]){
		if(args.length != 3){
			System.err.println("Usage: java Client <host> <port> <fileName>");
			System.exit(0);
		}
		
		Client c = new Client(args[0], Integer.parseInt(args[1]), args[2]);
		File f = c.read();
		
		
		
	}
	
}
